﻿using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Enterprise.Migrations
{
    public partial class eidttablename : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "MDT_GROUP_USERS");

            migrationBuilder.CreateTable(
                name: "MDT_GROUP_USER",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    GROUP_ID = table.Column<long>(type: "BIGINT", nullable: false),
                    DOCTOR_ID = table.Column<string>(type: "VARCHAR(60)", nullable: true),
                    DOCTOR_NAME = table.Column<string>(type: "VARCHAR(60)", nullable: true),
                    DOCTOR_DEPT = table.Column<string>(type: "VARCHAR(60)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MDT_GROUP_USER", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "MDT_GROUP_USER");

            migrationBuilder.CreateTable(
                name: "MDT_GROUP_USERS",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    DOCTOR_DEPT = table.Column<string>(type: "VARCHAR(60)", nullable: true),
                    DOCTOR_ID = table.Column<string>(type: "VARCHAR(60)", nullable: true),
                    DOCTOR_NAME = table.Column<string>(type: "VARCHAR(60)", nullable: true),
                    GROUP_ID = table.Column<long>(type: "BIGINT", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MDT_GROUP_USERS", x => x.Id);
                });
        }
    }
}
